package com.starbucks.opencase.construct;

import com.starbucks.opencase.entity.entProperties;
import com.starbucks.opencase.tool.toolProperties;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class constructProperties {
    @Autowired
    private toolProperties toolProperties;
    @PostConstruct
    public void testExist(){
        entProperties en= toolProperties.queryInfo();
        if(en!=null)return;
        en=new entProperties();
        en.setTimestamp(System.currentTimeMillis());
        en.setNuNickname("玩家{uid}");
        en.setNuEnergy(20);
        en.setNuPid("mao");
        en.setExpendEnergy(5);
        en.setProEnergy(0.3f);
        en.setProGoods(0.2f);
        en.setProPet(0.1f);
        en.setProBusinessman(0.1f);
        en.setProPlayer(0.1f);
        en.setProEnergyAward(10);
        en.setRobotRewardEnergy(10);
        en.setWalletMaxEnergy(200);
        en.setMessageCacheDay(30);
        toolProperties.insert(en);
    }
}
